/*
 * cipher_typedef.c
 *
 *  Created on: 2015-6-1
 *      Author: Xidian
 */

#include "cipher_typedef.h"
#include <stdlib.h>

void freeDataBlock(DataBlock *pDataBlock) {
	if(pDataBlock->data != NULL) {
		free(pDataBlock->data);
		pDataBlock->dataLength = 0;
		pDataBlock->data = NULL;
	}
}


void freeCipherDataBlock(CipherDataBlock * pCipherDataBlock) {
	if(pCipherDataBlock->data != NULL) {
		free(pCipherDataBlock->data);
		pCipherDataBlock->dataLength = 0;
		pCipherDataBlock->plainDataLength = 0;
		pCipherDataBlock->data = NULL;
	}
}
